home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / include / ds3100.md / cmplrs / stsupport.h < prev   
C/C++ Source or Header  |  1991-07-02  |  6KB  |  153 lines

  1. /*    @(#)stsupport.h    4.2    (ULTRIX)    8/9/88                      */
  2. #ifdef mips
  3. /* --------------------------------------------------- */
  4. /* | Copyright (c) 1986 MIPS Computer Systems, Inc.  | */
  5. /* | All Rights Reserved.                            | */
  6. /* --------------------------------------------------- */
  7. /* $Header: stsupport.h,v 1031.1 88/04/18 17:18:50 bettina Exp $ */
  8. /*
  9.  * Author    Mark I. Himelstein
  10.  * Date Started    5/15/85
  11.  * Purpose    provide support to uc to produce mips symbol tables.
  12.  */
  13.  
  14. #ifdef LANGUAGE_C
  15. AUXU _auxtemp;
  16. #define AUXINT(c) ((_auxtemp.isym = c), _auxtemp)
  17.  
  18.  
  19. /* the following struct frames the FDR dtructure and is used at runtime
  20.  *    to access the objects in the FDR with pointers (since the FDR
  21.  *    only has indeces.
  22.  */
  23. typedef struct {
  24.     pFDR    pfd;        /* file descriptor for this file */
  25.     pSYMR    psym;        /* symbols for this file */
  26.     long    csymMax;    /* max allocated */
  27.     pAUXU    paux;        /* auxiliaries for this file */
  28.     long    cauxMax;    /* max allocated */
  29.     char    *pss;        /* strings space for this file */
  30.     long    cbssMax;    /* max bytes allowed in ss */
  31.     pOPTR    popt;        /* optimization table for this file */
  32.     long    coptMax;    /* max allocated */
  33.     pLINER    pline;        /* lines for this file */
  34.     long    clineMax;    /* max allocated */
  35.     pRFDT    prfd;        /* file indirect for this file */
  36.     long    crfdMax;    /* max allocated */
  37.     pPDR    ppd;        /* procedure descriptor tables */
  38.     long    cpdMax;        /* max allocated */
  39.     long    freadin;    /* set if read in */
  40.     } CFDR, *pCFDR;
  41. #define cbCFDR sizeof (CFDR)
  42. #define cfdNil ((pCFDR) 0)
  43. #define icfdNil -1
  44.  
  45.  
  46. /* the following struct embodies the HDRR dtructure and is used at runtime
  47.  *    to access the objects in the HDRR with pointers (since the HDRR
  48.  *    only has indeces.
  49.  */
  50. typedef struct {
  51.     long    fappend;    /* are we appending to this beast ? */
  52.     pCFDR    pcfd;        /* the compile time file descriptors */
  53.     pFDR    pfd;        /* all of the file descriptors in this cu */
  54.     long    cfd;        /* count of file descriptors */
  55.     long    cfdMax;        /* max file descriptors */
  56.     pSYMR    psym;        /* the symbols for this cu */
  57.     pEXTR    pext;        /* externals for this cu */
  58.     long    cext;        /* number of externals */
  59.     long    cextMax;    /* max currently allowed */
  60.     char    *pssext;    /* string space for externals */
  61.     long    cbssext;    /* # of bytes in ss */
  62.     long    cbssextMax;    /* # of bytes allowed in ss */
  63.     pAUXU    paux;        /* auxiliaries for this cu */
  64.     char    *pss;        /* string space for this cu */
  65.     pDNR    pdn;        /* dense number table for this cu */
  66.     long    cdn;        /* number of dn's */
  67.     long    cdnMax;        /* max currently allowed */
  68.     pOPTR    popt;        /* optimization table for this cu */
  69.     pLINER    pline;        /* lines for this cu */
  70.     pRFDT    prfd;        /* file indirect for this cu */
  71.     pPDR    ppd;        /* procedure descriptor tables */
  72.     int    flags;        /* which has been read in already */
  73.     int    fswap;        /* do dubtables need to be swapped */
  74.     HDRR    hdr;        /* header from disk */
  75.     } CHDRR, *pCHDRR;
  76. #define cbCHDRR sizeof (CHDRR)
  77. #define chdrNil ((pCHDRR) 0)
  78. #define ichdrNil -1
  79. #endif LANGUAGE_C
  80.  
  81. /* constants and macros */
  82.  
  83. #define ST_FILESINIT    25     /* initial number of files */
  84. #define ST_STRTABINIT    512     /* initial number of bytes in strring space */
  85. #define ST_EXTINIT    32    /* initial number of symbols/file */
  86. #define ST_SYMINIT    64    /* initial number of symbols/file */
  87. #define ST_AUXINIT    64    /* initial number of auxiliaries/file */
  88. #define ST_LINEINIT    512    /* initial number of auxiliaries/file */
  89. #define ST_PDINIT    32    /* initial number of procedures in one file */
  90. #define ST_DNINIT    128    /* initial # of dense numbers */
  91. #define ST_FDISS    1    /* we expect a fd's iss to be this */
  92. #define ST_IDNINIT    2    /* start the dense num tab with this entry */
  93. #define ST_PROCTIROFFSET 1    /* offset from aux of proc's tir */
  94. #define ST_RELOC    1    /* this sym has been reloced already */
  95.  
  96. #ifdef LANGUAGE_FORTRAN
  97. #define ST_EXTIFD    0x7fffffff    /* ifd for externals */
  98. #define ST_RFDESCAPE    0xfff    /* rndx.rfd escape says next aux is rfd */
  99. #define ST_ANONINDEX    0xfffff /* rndx.index for anonymous names */
  100. #endif LANGUAGE_FORTRAN
  101.  
  102. #ifdef LANGUAGE_C
  103. #define ST_EXTIFD    0x7fffffff    /* ifd for externals */
  104. #define ST_RFDESCAPE    0xfff    /* rndx.rfd escape says next aux is rfd */
  105. #define ST_ANONINDEX    0xfffff /* rndx.index for anonymous names */
  106. #define ST_PEXTS    0x01    /* mask, if set externals */
  107. #define ST_PSYMS    0x02    /* mask, if set symbols */
  108. #define ST_PLINES    0x04    /* mask, if set lines */
  109. #define ST_PHEADER    0x08    /* mask, if set headers */
  110. #define ST_PDNS        0x10    /* mask, if set dense numbers */
  111. #define ST_POPTS    0x20    /* mask, if set optimization entries */
  112. #define ST_PRFDS    0x40    /* mask, if set file indirect entries */
  113. #define ST_PSSS        0x80    /* mask, if set string space */
  114. #define ST_PPDS        0x100    /* mask, if set proc descriptors */
  115. #define ST_PFDS        0x200    /* mask, if set file descriptors */
  116. #define ST_PAUXS    0x400    /* mask, if set auxiliaries */
  117. #define ST_PSSEXTS    0x800    /* mask, if set external string space */
  118. #endif LANGUAGE_C
  119.  
  120. #ifdef LANGUAGE_PASCAL
  121. #define ST_EXTIFD    16#7fffffff    /* ifd for externals */
  122. #define ST_RFDESCAPE    16#fff    /* rndx.rfd escape says next aux is rfd */
  123. #define ST_ANONINDEX    16#fffff /* rndx.index for anonymous names */
  124. #define ST_PEXTS    16#01    /* mask, if set externals */
  125. #define ST_PSYMS    16#02    /* mask, if set symbols */
  126. #define ST_PLINES    16#04    /* mask, if set lines */
  127. #define ST_HEADER    16#08    /* mask, if set header */
  128. #define ST_PDNS        16#10    /* mask, if set dense numbers */
  129. #define ST_POPTS    16#20    /* mask, if set optimization entries */
  130. #define ST_PRFDS    16#40    /* mask, if set file indirect entries */
  131. #define ST_PSSS        16#80    /* mask, if set string space */
  132. #define ST_PPDS        16#100    /* mask, if set proc descriptors */
  133. #define ST_PFDS        16#200    /* mask, if set file descriptors */
  134. #define ST_PAUXS    16#400    /* mask, if set auxiliaries */
  135. #define ST_PSSEXTS    16#800    /* mask, if set external string space */
  136. #endif LANGUAGE_PASCAL
  137.  
  138. #define ST_FCOMPLEXBT(bt) ((bt == btStruct) || (bt == btUnion) || (bt == btTypedef) || (bt == btEnum))
  139. #define valueNil    0
  140. #define export
  141.  
  142. /*
  143.  * Constants to describe aux types used in swap_aux( , ,type);
  144.  */
  145. #define ST_AUX_TIR    0
  146. #define ST_AUX_RNDXR    1
  147. #define ST_AUX_DNLOW    2
  148. #define ST_AUX_DNMAC    3
  149. #define ST_AUX_ISYM    4
  150. #define ST_AUX_ISS    5
  151. #define ST_AUX_WIDTH    6
  152. #endif mips
  153.